package com.test.demo.provider.service.impl;


import com.test.demo.provider.service.DemoService;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Value;

@Service(version = "timeout" ,timeout = 5000)
public class TimeOutDemoServiceImpl implements DemoService {

    @Value("${server.port}")
    private Integer port;
    @Override
    public String sayHello(String msg) {
        try {
            Thread.sleep(4000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("Hello "+msg+port);
        return "Hello "+msg+port;
    }
}
